package com.zq.api.user;

import com.zq.api.util.FeignInterceptorAddHelper;
import com.zq.common.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @Author 张乔
 * @Date 2025/2/20 20:42
 */
@FeignClient(value = "sa-user",
        configuration = FeignInterceptorAddHelper.class)       // 请求拦截器 （关键代码)
public interface UserFeignClient {

    @GetMapping("/users/user-address/auth/getById/{id}")
    Result<Object> getById(@PathVariable("id") Integer id);

    //获取用户信息
    @GetMapping("/users/getUserInfo")
    Result<Object> getUserInfo(@RequestHeader("userToken")String userToken);
}
